package net.xdclass.jvm;

/**
 * @author zhaowei
 * @Description TODO
 * @Remark 有问题直接联系我
 * @Version 1.0
 **/
public class StackSizeDemo {

    /**
     * //栈参数,最少208k
     * -Xss524k
     * -Xss1m
     * -Xss10m
     *
     */

    private static int count = 0;

    public static void main(String[] args) {
        try {
            recursiveMethod();
        } catch (Throwable t) {
            System.out.println("Stack overflow after " + count + " invocations.");
            t.printStackTrace();
        }
    }
    private static void recursiveMethod() {
        count++;
        recursiveMethod();
    }


}
